<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1_验证Diffing算法</title>
</head>

<body>

    <div id="test" />
    <script type="text/javascript"
        src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/react/18.2.0/umd/react.production.min.js"></script>
    <script type="text/javascript"
        src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
    <script type="text/javascript"
        src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/babel-standalone/6.26.0/babel.min.js"></script>

    <script type="text/babel">
        class TimeShow extends React.Component {
            state = { date: new Date() }
            componentDidMount() {
                setInterval(() => {
                    this.setState({ date: new Date() })
                }, 1000)
            }
            render() {
                return (
                    <div>
                        <h1>hello</h1>
                        <input type="text" name="input1" />
                        <span>现在是:{this.state.date.toTimeString()}</span>
                    </div>
                )
            }
        }
        ReactDOM.render(<TimeShow />, document.getElementById("test"))
    </script>
</body>

</html>